<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: linuxTimer类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#friends">友元</a> &#124;
<a href="../../d4/de6/classlinux_timer-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">linuxTimer类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>遵循POSIX标准的TIMER  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a>&gt;</code></p>
<div class="dynheader">
类 linuxTimer 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../df/d2d/classlinux_timer__inherit__graph.png" border="0" usemap="#alinux_timer_inherit__map" alt="Inheritance graph"/></div>
<map name="alinux_timer_inherit__map" id="alinux_timer_inherit__map">
<area shape="rect" title="遵循POSIX标准的TIMER" alt="" coords="13,347,189,827"/>
<area shape="rect" href="../../d2/d38/structi_timer.html" title="定时器定义接口" alt="" coords="5,5,196,299"/>
<area shape="poly" title=" " alt="" coords="103,314,103,347,98,347,98,314"/>
</map>
</div>
<div class="dynheader">
linuxTimer 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/dc2/classlinux_timer__coll__graph.png" border="0" usemap="#alinux_timer_coll__map" alt="Collaboration graph"/></div>
<map name="alinux_timer_coll__map" id="alinux_timer_coll__map">
<area shape="rect" title="遵循POSIX标准的TIMER" alt="" coords="13,347,189,827"/>
<area shape="rect" href="../../d2/d38/structi_timer.html" title="定时器定义接口" alt="" coords="5,5,196,299"/>
<area shape="poly" title=" " alt="" coords="103,314,103,347,98,347,98,314"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:abeebd83796551a74702a0660900f7e5e" id="r_abeebd83796551a74702a0660900f7e5e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abeebd83796551a74702a0660900f7e5e">linuxTimer</a> ()</td></tr>
<tr class="separator:abeebd83796551a74702a0660900f7e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00cfbf6e7956a9ae875d4392313c0f29" id="r_a00cfbf6e7956a9ae875d4392313c0f29"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a00cfbf6e7956a9ae875d4392313c0f29">linuxTimer</a> (long ms, bool oneShot=false)</td></tr>
<tr class="separator:a00cfbf6e7956a9ae875d4392313c0f29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc0980d8b3243467393d106770d099d9" id="r_afc0980d8b3243467393d106770d099d9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afc0980d8b3243467393d106770d099d9">linuxTimer</a> (std::function&lt; void()&gt; fun, long ms, bool onShot=false)</td></tr>
<tr class="separator:afc0980d8b3243467393d106770d099d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d01213e0512dc61a339d734c56a3e5" id="r_a92d01213e0512dc61a339d734c56a3e5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a92d01213e0512dc61a339d734c56a3e5">~linuxTimer</a> ()</td></tr>
<tr class="separator:a92d01213e0512dc61a339d734c56a3e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf7528c1f1ef1fd905cea11a3392e06e" id="r_abf7528c1f1ef1fd905cea11a3392e06e"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abf7528c1f1ef1fd905cea11a3392e06e">operator()</a> () const</td></tr>
<tr class="memdesc:abf7528c1f1ef1fd905cea11a3392e06e"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置和获取计时器计时长度  <br /></td></tr>
<tr class="separator:abf7528c1f1ef1fd905cea11a3392e06e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7e07e53a738b37156355a46fba45715" id="r_ac7e07e53a738b37156355a46fba45715"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac7e07e53a738b37156355a46fba45715">operator()</a> (long t)</td></tr>
<tr class="separator:ac7e07e53a738b37156355a46fba45715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93a10e9e8a6ee3079f2c98425ce433aa" id="r_a93a10e9e8a6ee3079f2c98425ce433aa"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a93a10e9e8a6ee3079f2c98425ce433aa">Start</a> (long ms=-1, bool oneShot=false) final</td></tr>
<tr class="memdesc:a93a10e9e8a6ee3079f2c98425ce433aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动或者重启计时器。  <br /></td></tr>
<tr class="separator:a93a10e9e8a6ee3079f2c98425ce433aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7663f68ea95168f3d72c8e0199c32bed" id="r_a7663f68ea95168f3d72c8e0199c32bed"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7663f68ea95168f3d72c8e0199c32bed">SetOwner</a> (std::function&lt; void()&gt; fun) final</td></tr>
<tr class="memdesc:a7663f68ea95168f3d72c8e0199c32bed"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定事件响应函数，  <br /></td></tr>
<tr class="separator:a7663f68ea95168f3d72c8e0199c32bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f8127cc511dc74220398e4ed6758551" id="r_a9f8127cc511dc74220398e4ed6758551"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9f8127cc511dc74220398e4ed6758551">Stop</a> () final</td></tr>
<tr class="memdesc:a9f8127cc511dc74220398e4ed6758551"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止计时器  <br /></td></tr>
<tr class="separator:a9f8127cc511dc74220398e4ed6758551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64e54112f6cb165dee88a5d0ae8045c0" id="r_a64e54112f6cb165dee88a5d0ae8045c0"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a64e54112f6cb165dee88a5d0ae8045c0">IsRuning</a> () final</td></tr>
<tr class="memdesc:a64e54112f6cb165dee88a5d0ae8045c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断计时器是否正在运行  <br /></td></tr>
<tr class="separator:a64e54112f6cb165dee88a5d0ae8045c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a399b8f2aecafb381a836e7f89a3cb865" id="r_a399b8f2aecafb381a836e7f89a3cb865"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a399b8f2aecafb381a836e7f89a3cb865">setTick</a> (long t) final</td></tr>
<tr class="separator:a399b8f2aecafb381a836e7f89a3cb865"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5472bac2316d32981b30f6a8b1600e83" id="r_a5472bac2316d32981b30f6a8b1600e83"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5472bac2316d32981b30f6a8b1600e83">Reset</a> () final</td></tr>
<tr class="memdesc:a5472bac2316d32981b30f6a8b1600e83"><td class="mdescLeft">&#160;</td><td class="mdescRight">复位计时，让计时器从零开始计时  <br /></td></tr>
<tr class="separator:a5472bac2316d32981b30f6a8b1600e83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
友元</h2></td></tr>
<tr class="memitem:a6b4fa40672b13152c51b3073b180ba6e" id="r_a6b4fa40672b13152c51b3073b180ba6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6b4fa40672b13152c51b3073b180ba6e">linux_on_timer</a> (sigval info)</td></tr>
<tr class="separator:a6b4fa40672b13152c51b3073b180ba6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_types_structi_timer"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_types_structi_timer')"><img src="../../closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="../../d2/d38/structi_timer.html">iTimer</a></td></tr>
<tr class="memitem:a31bdd3250ca6c5542d0ec156bd82c5ab inherit pub_types_structi_timer" id="r_a31bdd3250ca6c5542d0ec156bd82c5ab"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> { <br />
&#160;&#160;<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5abaa09563b77a12d14f77018d048ce4d6fb">ERR_CREATE_TIMER</a> = -1000
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba411cbed936ceec95393a481fd39d6cef">ERR_MISSING_INFO_FUN</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba69bdc858844fbe024b1459b4d869e2a7">ERR_START_TIMER</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba9d8d590f2b964254d8190d547b882fde">ERR_STOP_TIMER</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba4033ecbc2c2e7418fd4f2d5e62159d6c">ERR_TICK</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba74f5e1cb5939af592e4e7c06a3406e9e">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a31bdd3250ca6c5542d0ec156bd82c5ab inherit pub_types_structi_timer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_structi_timer"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_static_methods_structi_timer')"><img src="../../closed.png" alt="-"/>&#160;静态 Public 成员函数 继承自 <a class="el" href="../../d2/d38/structi_timer.html">iTimer</a></td></tr>
<tr class="memitem:ae0b9a3f6caa6ae2a56bd06898da25ce1 inherit pub_static_methods_structi_timer" id="r_ae0b9a3f6caa6ae2a56bd06898da25ce1"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d38/structi_timer.html#ae0b9a3f6caa6ae2a56bd06898da25ce1">errMsg</a> (<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> e)</td></tr>
<tr class="separator:ae0b9a3f6caa6ae2a56bd06898da25ce1 inherit pub_static_methods_structi_timer"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>遵循POSIX标准的TIMER </p>
<dl class="section version"><dt>版本</dt><dd>1.0 </dd></dl>
<dl class="section author"><dt>作者</dt><dd>宋炜 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2021-11-2 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a> 第 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html#l00019">19</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="abeebd83796551a74702a0660900f7e5e" name="abeebd83796551a74702a0660900f7e5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abeebd83796551a74702a0660900f7e5e">&#9670;&#160;</a></span>linuxTimer() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">linuxTimer::linuxTimer </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00028">28</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/d91/classlinux_timer_abeebd83796551a74702a0660900f7e5e_cgraph.png" border="0" usemap="#ad9/d91/classlinux_timer_abeebd83796551a74702a0660900f7e5e_cgraph" alt=""/></div>
<map name="ad9/d91/classlinux_timer_abeebd83796551a74702a0660900f7e5e_cgraph" id="ad9/d91/classlinux_timer_abeebd83796551a74702a0660900f7e5e_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,155,32"/>
<area shape="rect" href="../../d2/d38/structi_timer.html#ae0b9a3f6caa6ae2a56bd06898da25ce1" title=" " alt="" coords="203,5,308,32"/>
<area shape="poly" title=" " alt="" coords="155,16,187,16,187,21,155,21"/>
</map>
</div>

</div>
</div>
<a id="a00cfbf6e7956a9ae875d4392313c0f29" name="a00cfbf6e7956a9ae875d4392313c0f29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00cfbf6e7956a9ae875d4392313c0f29">&#9670;&#160;</a></span>linuxTimer() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">linuxTimer::linuxTimer </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00042">42</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/d91/classlinux_timer_a00cfbf6e7956a9ae875d4392313c0f29_cgraph.png" border="0" usemap="#ad9/d91/classlinux_timer_a00cfbf6e7956a9ae875d4392313c0f29_cgraph" alt=""/></div>
<map name="ad9/d91/classlinux_timer_a00cfbf6e7956a9ae875d4392313c0f29_cgraph" id="ad9/d91/classlinux_timer_a00cfbf6e7956a9ae875d4392313c0f29_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,155,32"/>
<area shape="rect" href="../../d2/d38/structi_timer.html#ae0b9a3f6caa6ae2a56bd06898da25ce1" title=" " alt="" coords="203,5,308,32"/>
<area shape="poly" title=" " alt="" coords="155,16,187,16,187,21,155,21"/>
</map>
</div>

</div>
</div>
<a id="afc0980d8b3243467393d106770d099d9" name="afc0980d8b3243467393d106770d099d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc0980d8b3243467393d106770d099d9">&#9670;&#160;</a></span>linuxTimer() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">linuxTimer::linuxTimer </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>onShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00056">56</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/d91/classlinux_timer_afc0980d8b3243467393d106770d099d9_cgraph.png" border="0" usemap="#ad9/d91/classlinux_timer_afc0980d8b3243467393d106770d099d9_cgraph" alt=""/></div>
<map name="ad9/d91/classlinux_timer_afc0980d8b3243467393d106770d099d9_cgraph" id="ad9/d91/classlinux_timer_afc0980d8b3243467393d106770d099d9_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,155,32"/>
<area shape="rect" href="../../d2/d38/structi_timer.html#ae0b9a3f6caa6ae2a56bd06898da25ce1" title=" " alt="" coords="203,5,308,32"/>
<area shape="poly" title=" " alt="" coords="155,16,187,16,187,21,155,21"/>
</map>
</div>

</div>
</div>
<a id="a92d01213e0512dc61a339d734c56a3e5" name="a92d01213e0512dc61a339d734c56a3e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92d01213e0512dc61a339d734c56a3e5">&#9670;&#160;</a></span>~linuxTimer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">linuxTimer::~linuxTimer </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a> 第 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html#l00046">46</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/d91/classlinux_timer_a92d01213e0512dc61a339d734c56a3e5_cgraph.png" border="0" usemap="#ad9/d91/classlinux_timer_a92d01213e0512dc61a339d734c56a3e5_cgraph" alt=""/></div>
<map name="ad9/d91/classlinux_timer_a92d01213e0512dc61a339d734c56a3e5_cgraph" id="ad9/d91/classlinux_timer_a92d01213e0512dc61a339d734c56a3e5_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,163,32"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html#a9f8127cc511dc74220398e4ed6758551" title="停止计时器" alt="" coords="211,5,327,32"/>
<area shape="poly" title=" " alt="" coords="163,16,195,16,195,21,163,21"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a64e54112f6cb165dee88a5d0ae8045c0" name="a64e54112f6cb165dee88a5d0ae8045c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64e54112f6cb165dee88a5d0ae8045c0">&#9670;&#160;</a></span>IsRuning()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool linuxTimer::IsRuning </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断计时器是否正在运行 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#abea86b75a4bcc2399821b799e221b9ce">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00147">147</a> 行定义.</p>

</div>
</div>
<a id="abf7528c1f1ef1fd905cea11a3392e06e" name="abf7528c1f1ef1fd905cea11a3392e06e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf7528c1f1ef1fd905cea11a3392e06e">&#9670;&#160;</a></span>operator()() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long linuxTimer::operator() </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置和获取计时器计时长度 </p>

<p class="definition">在文件 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a> 第 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<a id="ac7e07e53a738b37156355a46fba45715" name="ac7e07e53a738b37156355a46fba45715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7e07e53a738b37156355a46fba45715">&#9670;&#160;</a></span>operator()() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linuxTimer::operator() </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>t</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a> 第 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html#l00054">54</a> 行定义.</p>

</div>
</div>
<a id="a5472bac2316d32981b30f6a8b1600e83" name="a5472bac2316d32981b30f6a8b1600e83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5472bac2316d32981b30f6a8b1600e83">&#9670;&#160;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> linuxTimer::Reset </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>复位计时，让计时器从零开始计时 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#ad51fd07ebb8585928243674cb21e80e0">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00179">179</a> 行定义.</p>

</div>
</div>
<a id="a7663f68ea95168f3d72c8e0199c32bed" name="a7663f68ea95168f3d72c8e0199c32bed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7663f68ea95168f3d72c8e0199c32bed">&#9670;&#160;</a></span>SetOwner()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linuxTimer::SetOwner </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定事件响应函数， </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>，事件响应的函数对象，使用std::bind完成或者直接指定函数对象 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#aa51cbfaef39ee9841c24ff65ce720acc">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00122">122</a> 行定义.</p>

</div>
</div>
<a id="a399b8f2aecafb381a836e7f89a3cb865" name="a399b8f2aecafb381a836e7f89a3cb865"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a399b8f2aecafb381a836e7f89a3cb865">&#9670;&#160;</a></span>setTick()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void linuxTimer::setTick </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>t</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a3aaa71906aca3939acf219852b2d36d9">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a> 第 <a class="el" href="../../d2/de0/linux_timer_8hpp_source.html#l00077">77</a> 行定义.</p>

</div>
</div>
<a id="a93a10e9e8a6ee3079f2c98425ce433aa" name="a93a10e9e8a6ee3079f2c98425ce433aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93a10e9e8a6ee3079f2c98425ce433aa">&#9670;&#160;</a></span>Start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> linuxTimer::Start </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>启动或者重启计时器。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ms</td><td>， 计时时长，单位ms，当ms小于0的时候，使用就计时时长启动计时器 </td></tr>
    <tr><td class="paramname">oneShot</td><td>， 是否单次计时，true单次计时，否则连续计时 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a0bd87be9906e599b0776fc592cf81f9c">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00072">72</a> 行定义.</p>

</div>
</div>
<a id="a9f8127cc511dc74220398e4ed6758551" name="a9f8127cc511dc74220398e4ed6758551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f8127cc511dc74220398e4ed6758551">&#9670;&#160;</a></span>Stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> linuxTimer::Stop </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>停止计时器 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a38cfdd65a88c39d24e2ddc3ceeebda2e">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00128">128</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d9/d91/classlinux_timer_a9f8127cc511dc74220398e4ed6758551_icgraph.png" border="0" usemap="#ad9/d91/classlinux_timer_a9f8127cc511dc74220398e4ed6758551_icgraph" alt=""/></div>
<map name="ad9/d91/classlinux_timer_a9f8127cc511dc74220398e4ed6758551_icgraph" id="ad9/d91/classlinux_timer_a9f8127cc511dc74220398e4ed6758551_icgraph">
<area shape="rect" title="停止计时器" alt="" coords="211,5,327,32"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html#a92d01213e0512dc61a339d734c56a3e5" title=" " alt="" coords="5,5,163,32"/>
<area shape="poly" title=" " alt="" coords="195,21,163,21,163,16,195,16"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">友元及相关符号说明</h2>
<a id="a6b4fa40672b13152c51b3073b180ba6e" name="a6b4fa40672b13152c51b3073b180ba6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b4fa40672b13152c51b3073b180ba6e">&#9670;&#160;</a></span>linux_on_timer</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void linux_on_timer </td>
          <td>(</td>
          <td class="paramtype">sigval</td>          <td class="paramname"><span class="paramname"><em>info</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a> 第 <a class="el" href="../../d1/d91/linux_timer_8cpp_source.html#l00005">5</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/details/<a class="el" href="../../d2/de0/linux_timer_8hpp_source.html">linuxTimer.hpp</a></li>
<li>src/details/<a class="el" href="../../d1/d91/linux_timer_8cpp_source.html">linuxTimer.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
